// import com.alibaba.druid.sql.ast.SQLName;
// import com.alibaba.druid.sql.ast.SQLObjectImpl;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

// import java.util.ArrayList;
// import java.util.List;

#include "SQLAlterTableModifyClusteredBy.h"
#include "../../visitor/SQLASTVisitor.h"
#include "../SQLName.h"
#include "../../../utils/listTran.h"

SQLAlterTableModifyClusteredBy::SQLAlterTableModifyClusteredBy()
{
  clusterColumns = std::make_shared<std::list<SQLName_ptr>>();
}
SQLName_list_ptr SQLAlterTableModifyClusteredBy::getClusterColumns()
{
  return clusterColumns;
}

void SQLAlterTableModifyClusteredBy::addClusterColumn(SQLName_ptr name)
{
  this->clusterColumns->push_back(name);
}

// @Override
void SQLAlterTableModifyClusteredBy::accept0(SQLASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(SQLAlterTableModifyClusteredBy)))
  {
    SQLObject_list_ptr tmp1 = ListTran::tran_class<SQLName, SQLObject>(clusterColumns);
    acceptChild(visitor, tmp1);
  }
  visitor->endVisit(SharedObject(SQLAlterTableModifyClusteredBy));
}
